package com.ttloner.admin.mapper;

import com.ttloner.admin.bean.User;
import org.apache.ibatis.annotations.*;

/**
 * @author TTLoner
 * @date 2021/7/22 15:48
 * @description
 */
@Mapper
public interface UserMapper {
    @Insert("insert into user values(null,#{userName},#{password})")
    public void insert(User user);
    @Delete("delete from user where u_id=#{id}")
    public void deleteById(int id);
    @Update("Update my_user set user_name=#{userName}," +
            "password=#{password}")
    public void update(User user);
    @Select("Select password from user where user_name=#{userName}")
    public String selectPasswordByName(String userName);
}
